package com.goktech.olala.core.service.impl;

import com.goktech.olala.core.service.IGoodsReportService;
import com.goktech.olala.server.dao.goods.GoodsReportMapper;
import com.goktech.olala.server.pojo.goods.GoodsReport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Classname IGoodsReportServiceImp
 * @Description TODO
 * @Date 2020/12/20 17:04
 * @Created by ASUS
 */
@Service
public class IGoodsReportServiceImp implements IGoodsReportService {

    @Autowired
    GoodsReportMapper goodsReportMapper;

    @Override
    public int deleteByPrimaryKey(String goodsId) {
        int i = goodsReportMapper.deleteByPrimaryKey(goodsId);
        return i;
    }

    @Override
    public int insert(GoodsReport record) {
        int insert = goodsReportMapper.insert(record);
        return insert;
    }

    @Override
    public GoodsReport selectByPrimaryKey(String goodsId) {
        GoodsReport goodsReport = goodsReportMapper.selectByPrimaryKey(goodsId);
        return goodsReport;
    }

    @Override
    public List<GoodsReport> selectAll() {
        List<GoodsReport> goodsReportList = goodsReportMapper.selectAll();
        return goodsReportList;
    }

    @Override
    public int updateByPrimaryKey(GoodsReport record) {
        int i = goodsReportMapper.updateByPrimaryKey(record);
        return i;
    }
}
